package com.iut.contactlist;

/**
 * Contains the informations of a contact
 * @author coutinn
 */
public class Contact {
	
	private String name;
	private String number;

	/**
	 * Constructor of the Contact class.
	 * @param name Name of the contact
	 * @param number Phone number of the contact
	 */
	public Contact(String name, String number) {
		this.name = name;
		this.number = number;
	}
	
	/**
	 * Returns the name of the contact
	 * @return Name of the contact
	 */
	public String getName() {
		return this.name;
	}
	
	/**
	 * Returns the phone number of the contact
	 * @return Phone number of the contact
	 */
	public String getNumber() {
		return this.number;
	}
	
	/**
	 * Returns the contact converted to String type.
	 * @return The name and the phone number of the contact.
	 * <br/><b>Exemple :</b><br/>
	 *     "Name : Batman. Number : 1337"
	 */
	@Override
	public String toString() {
		return "Name : "+this.name+". Number : "+this.number;
	}

}